package modelimplementation


type BiweeklySchedul struct{
}

func(b *BiweeklySchedul) IsPaydate(payDate DateTime) bool{
	firstPayableFriday := NewDateTime(2001, 11, 9)

	ts :=  payDate.Subtract(firstPayableFriday)

	datysSinceFirstPayableFirday := ts.Days

	return (daysSinceFirstPayableFriday % 14) == 0; //  two weeks.
}

func(b *BiweeklySchedul) GetPayPeriodStartDate(DateTime payPeriodEndDate) DateTime{
	return payPeriodEndDate.AddDays( - 13); // Saturday, two weeks ago.
}

